#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	int n;
	cin>>n;
	vector<int> tjsm;
	vector<int> qwsm;
	int kl;
	for(int i=0;i<n;i++){
		cin>>kl;
		tjsm.push_back(kl);
	}
	for(int i=0;i<n;i++){
		cin>>kl;
		qwsm.push_back(kl);
	}
	sort(tjsm.begin(),tjsm.end());
	sort(qwsm.begin(),qwsm.end());
	vector<int>::iterator it;
	vector<int>::iterator sit;
	int count=0;
	while(1){
		if(tjsm.size()==1){
			if(tjsm[0]==qwsm[0]){
				break;
			}
			else if(tjsm[0]>qwsm[0]){
				count+=200;
				break;
			}
			else{
				count-=200;
				break;
			}
		}
		it=tjsm.end();
		it--;
		sit=qwsm.end();
		sit--;
		if(*it>*sit){
			count+=200;
			tjsm.erase(it);
			qwsm.erase(sit);
			continue;
		}
		else{
			it=tjsm.begin();
			sit=qwsm.begin();
			if(*it>*sit){
				count+=200;
				tjsm.erase(it);
				qwsm.erase(sit);
				continue;
			}
			else{
				count-=200;
				sit=qwsm.end();
				sit--;
                if(*it==*sit){
					count+=200;
				}
				tjsm.erase(it);
				qwsm.erase(sit);
				continue;
			} 
		}
	}
	cout<<count;
}
